package cn.edu.sdju.wanglo1911.team10.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.sdju.wanglo1911.team10.dao.UserAccountDao;
import cn.edu.sdju.wanglo1911.team10.po.QueryOption;
import cn.edu.sdju.wanglo1911.team10.po.UserAccount;

@Service
public class UserAccountImpl implements UserAccountService {

	@Autowired
	private UserAccountDao userAccountDao;
	
	public UserAccount getUserAccountById(String id) {
		// TODO Auto-generated method stub
		return userAccountDao.getUserAccountById(id);
	}

	public List<UserAccount> getUserAccounts() {
		// TODO Auto-generated method stub
		return userAccountDao.getUserAccounts();
	}


	public void deleteUserAccountByIds(List<String> ids) {
		// TODO Auto-generated method stub
		userAccountDao.deleteUserAccountByIds(ids);
	}

	public void updateUserAccount(UserAccount userAccount) {
		// TODO Auto-generated method stub
		userAccountDao.updateUserAccount(userAccount);
	}

	public UserAccount getUserAccountByNick(String nick) {
		// TODO Auto-generated method stub
		return userAccountDao.getUserAccountByNick(nick);
	}

	public List<UserAccount> advanceQuery(QueryOption option) {
		// TODO Auto-generated method stub
		return userAccountDao.advanceQuery(option);
	}

	public Integer getTotalQueryNumber(QueryOption option) {
		// TODO Auto-generated method stub
		return userAccountDao.getTotalQueryNumber(option);
	}

	public void crateUserAccount(UserAccount userAccount) {
		// TODO Auto-generated method stub
		userAccountDao.crateUserAccount(userAccount);
	}
}
